Methods for adjusting sharpness and brightness of digital image

ABSTRACT

A method for adjusting sharpness and brightness of a digital image. In this method, an image function is first inputted into a processor. The image function comprises a plurality of control parameters. Next, the control parameter values of the control parameters are set, and then each of the pixels is sequentially leaded into the image function according to the control parameter value so as to perform the corresponding operation for adjusting the sharpness and brightness of the image. Finally, the adjusted image is outputted. Therefore, the two processes in the prior art, one for adjusting the brightness, the other for the sharpness, are merged into one process so that the design of the hardware circuit is simplified and the required memory space is reduced.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The present invention relates to a method for adjusting thesharpness and brightness of a digital image, and particularly to amethod for adjusting the sharpness and brightness of a digital imageadjustment capable of reducing the memory space.

[0003] 2. Description of the Prior Art

[0004] In order to improve the quality of viewing, it is required toadjust the sharpness and brightness of a digital image. Conventionally,there are two processes for separately adjusting the brightness and thesharpness. In the process of adjusting the sharpness, the followingmathematical formula is used.

ƒ_(s)(x,y)=ƒ(x,y)+Aƒ _(H)(x, y)

[0005] Where ƒ_(s)(x,y) is a function for denoting the image after thesharpness adjustment, ƒ_(H)(x,y) is a function relating to the highfrequency components of ƒ(x,y), and A is the sharpness control parameterand is a real number. If the control parameter A is positive, then theoutputted ƒ_(s)(x,y) is the sharpened results. If the control parameterA is negative, then the outputted ƒ_(s)(x,y) is the blurred result.

[0006] Furthermore, In the process of adjusting the brightness, thefollowing mathematical formula is used.

ƒ_(B)(x,y)=ƒ(x,y)(1+B)

[0007] Where ƒ_(B)(x,y) is a function for denoting the image afterperforming the brightness adjustment. B is the brightness controlparameter, and is a real number. If the control parameter B is positive,then the outputted ƒ_(s)(x,y) is the brightened result. Otherwise, ifthe control parameter B is negative, then the outputted ƒ_(s)(x,y) isthe darkened result.

[0008] The prior art method is performed on the digital images byseparately implementing the adjustment processes of sharpness andbrightness. Therefore, in the design of hardware, it is required toperform one step before the other step is performed so that thecomplexity of the hardware is increased. In addition, a buffer is neededfor temporarily storing the outputted data of the previous step so as torequire more memory space.

SUMMARY OF THE INVENTION

[0009] In order to resolve the mentioned problems of the prior artmethod for adjusting the sharpness and the brightness of the digitalimage, the present invention provides a method for adjusting thesharpness and the brightness of the digital image so as to improve theefficiency and reduced the required memory space.

[0010] The present invention relates a method for adjusting thesharpness and brightness of a digital image. In this method, the twoprocesses, separately for adjusting the brightness and the sharpness,are merged into one process so that the design of the hardware circuitis simplified and the required memory space is reduced.

[0011] In order to achieve the above objective, the method for adjustingthe sharpness and the brightness of the digital image according to theinvention is started by inputting an original image data. Next, aplurality of control parameter values are set, and then according thecontrol parameter value, each of the pixels is sequentially leaded intothe original image data so as to perform the corresponding operation foradjusting the sharpness and brightness. Finally, the adjusted image isoutputted so as to finish the adjustment of the sharpness andbrightness.

BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The accompanying drawings, which are incorporated in and formpart of the specification in which like numerals designate like parts,illustrate preferred embodiments of the present invention and togetherwith the description, serve to explain the principles of the invention.In the drawings:

[0013]FIG. 1 is a flowchart illustrating a method of adjusting sharpnessand brightness of a digital image according to the preferred embodimentof the present invention; and

[0014]FIG. 2 is a function table of the parameters k₁, k₂ and k₃ in thepreferred embodiment of the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

[0015]FIG. 1 is a flowchart illustrating a method of adjusting sharpnessand brightness of a digital image according to the preferred embodimentof the present invention. A processor is used for implementing thismethod, and the processor comprises the mathematical formula foradjusting the sharpness and brightness of the digital image. Themathematical formula will be described more detail in the following. Theadjustment method comprises the following steps.

[0016] First, in the step 10, an image data ƒ(x,y) is inputted into theprocessor and is leaded into the mathematical formula. Next, in the step11, a control parameter value is inputted, and in the step 12, eachpixel is sequentially leaded into the image data ƒ(x,y) so as to performthe corresponding calculation process of the sharpness and brightnessadjustment. In the step 13, the adjusted image data is outputted so asto finish the method for adjusting the sharpness and brightness.

[0017] The mathematical formula of the sharpness and brightness for theabove digital image is expressed as:${g\left( {x,y} \right)} = {{f\left( {x,y} \right)} + {k_{1}{\sum\limits_{i = {- m}}^{m}\quad {\sum\limits_{j = {- n}}^{n}{{w\left( {i,j} \right)} \cdot {f\left( {{x + i},{y + j}} \right)}}}}}}$

[0018] wherein g(x,y) is the image data after the sharpness andbrightness adjustment is performed on the digital image; ƒ(x,y) is theoriginal image data; k₁ is the sharpness control parameter; w(i,j) isthe spatial high-pass filtering image mask for obtaining the highfrequency components of the original image data. In this embodiment, themask is expressed as:${w\left( {i,j} \right)} = {\frac{1}{W}\begin{bmatrix}⋰ & \quad & \vdots & \quad & \ddots \\\quad & {k_{3}w_{{- 1},{- 1}}} & {k_{3}w_{0,{- 1}}} & {k_{3}w_{1,{- 1}}} & \quad \\\cdots & {k_{3}w_{{- 1},0}} & {{k_{3}w_{0,0}} + k_{2}} & {k_{3}w_{1,0}} & \cdots \\\quad & {k_{3}w_{{- 1},1}} & {k_{3}w_{0,1}} & {k_{3}w_{1,1}} & \quad \\\ddots & \quad & \vdots & \quad & ⋰\end{bmatrix}}$

[0019] where k₂ is the brightness control parameter, k₃ is the sharpnessadjustment enable parameter, and W is a normalized parameter of thefiltering mask.

[0020]FIG. 2 shows a function table relating to above parameters,including the sharpness control parameter k₁, the brightness controlparameter k₂ and the sharpness adjustment enable parameter k₃. If thesharpness control parameter k₁>0, then adjustment is a sharpeningprocess performed on the image. Otherwise, if the sharpness controlparameter k₁<0, then the adjustment is a blurring process performed onthe image. If the brightness control parameter k₂>0, then the adjustmentis a brightening process performed on the image. Otherwise, if thebrightness control parameter k₂<0, then the adjustment is a darkeningprocess performed on the image. If the sharpness adjustment enableparameter k₃=0, then sharpness adjustment is disabled. Otherwise, if thesharpness adjustment enable parameter k₃=1, then the sharpnessadjustment is enabled.

[0021] It should be noticed that in the above mathematical formula, ifn=0, then the image adjustment is only proceed in the horizontalorientation, and if m=0, then the image adjustment is only proceed inthe vertical orientation.

[0022] Furthermore, the above sharpness and brightness adjustment isonly applied to grayscale components. If the image is in a RGB system,then the adjustment for brightness and sharpness can be applied to eachof the three color components. If the image is in YUV system, then theadjustment for brightness and sharpness only can both be applied to Y,but only the adjustment for sharpness can be applied to U and V. Thatis, the brightness of U and V cannot be adjusted.

[0023] The following is another preferred embodiment of the mathematicalformula for adjusting the sharpness and brightness of the digital image.In this embodiment, the two well-known Laplacian high-pass filters areused for extracting the high frequency components of the image, and thesampling data of the two filters presented in one dimension are:

F₁=[−1,2,−1] and

F₂=[−1,0,2,0,−1]

[0024] Where F₁ is one half cycle of the sampling frequency data, and F₂is a quarter cycle of the sampling frequency data. Therefore, by usingthe high frequency components in these two frequency ranges, thesharpness adjustment of the image is performed. It should be noticedthat the brightness adjustment is irrelevant to the frequencycomponents.

[0025] The spatial filtering mask corresponding to the above samplingfrequency F₁ is: $W_{1} = {\frac{1}{W}\begin{bmatrix}{- 1} & {- 1} & {- 1} \\{- 1} & 8 & {- 1} \\{- 1} & {- 1} & {- 1}\end{bmatrix}}$

[0026] And the spatial filtering mask corresponding to the abovesampling frequency F₂ is: $W_{2} = {\frac{1}{W}\begin{bmatrix}{- 1} & 0 & {- 1} & 0 & {- 1} \\0 & 0 & 0 & 0 & 0 \\{- 1} & 0 & 8 & 0 & {- 1} \\0 & 0 & 0 & 0 & 0 \\{- 1} & 0 & {- 1} & 0 & {- 1}\end{bmatrix}}$

[0027] Where W is the normalized parameter of the two spatial filteringmasks. It is preferred that the range of W is from 7 to 11.

[0028] After applying the above masks W₁ and W₂ to the presentinvention, by using the high-pass filtering mask formula described inthe previous preferred embodiment, the masks W₁ and W₂ are respectivelyconverted to the followings:${W_{1}\left( {i,j} \right)} = {{\frac{1}{W}\begin{bmatrix}{- k_{3}} & {- k_{3}} & {- k_{3}} \\{- k_{3}} & {{{- k_{3}}8} + k_{2}} & {- k_{3}} \\{- k_{3}} & {- k_{3}} & {- k_{3}}\end{bmatrix}}\quad {and}}$${W_{2}\left( {i,j} \right)} = {\frac{1}{W}\begin{bmatrix}{- k_{3}} & 0 & {- k_{3}} & 0 & {- k_{3}} \\0 & 0 & 0 & 0 & 0 \\{- k_{3}} & 0 & {{{- k_{3}}8} + k_{2}} & 0 & {- k_{3}} \\0 & 0 & 0 & 0 & 0 \\{- k_{3}} & 0 & {- k_{3}} & 0 & {- k_{3}}\end{bmatrix}}$

[0029] Then the present invention can be expressed by the followingmathematical formula:${g\left( {x,y} \right)} = {{f\left( {x,y} \right)} + {{a \cdot k_{1}}{\sum\limits_{i = {- 1}}^{1}\quad {\sum\limits_{j = {- 1}}^{1}{{w_{1}\left( {i,j} \right)} \cdot {f\left( {{x + i},{y + j}} \right)}}}}} + {{\left( {1 - a} \right) \cdot k_{1}}{\sum\limits_{i = {- 2}}^{2}\quad \sum\limits_{j = {- 2}}^{2}}}}$

 w ₂(i,j)·ƒ(x+i,y+j)

[0030] where g(x,y) is the adjusted image data, ƒ(x,y) is the originalimage data, a·k₁ is the frequency data of one half sampling frequency;(1−a)·k₁ is the frequency data of a quarter sampling frequency. Thevalue of a is 0≦a≦1.

[0031] The above is the detailed description of the method for adjustingthe sharpness and brightness of the digital image according to thepresent invention. In this method, the two processes, separately foradjusting the sharpness and brightness, are merged into one process sothat the circuit design is simplified and the required memory space isreduced.

[0032] Those skilled in the art will readily observe that numerousmodifications and alterations of the device may be made while retainingthe teachings of the invention. Accordingly, the above disclosure shouldbe construed as limited only by the metes and bounds of the appendedclaims.

What is claimed is:
 1. A method for adjusting sharpness and brightnessof an digital image being implemented by a processor, and a mathematicalformula for adjusting the sharpness and brightness of the digital imagebeing stored in the processor, the method comprising: inputting anoriginal image data into the processor and leading it into themathematical formula; inputting a plurality of control parameter values;leading each pixel into the image data sequentially so as to perform thecorresponding calculation process of the sharpness and brightnessadjustment; and outputting the adjusted image data.
 2. The method ofclaim 1, wherein in the step of inputting a plurality of controlparameter values, the inputted parameters include a sharpness controlparameter, a brightness control parameter and a sharpness adjustmentenable parameter.
 3. The method of claim 2, wherein if the sharpnesscontrol parameter k₁>0, then adjustment is a sharpening processperformed on the image; otherwise, if the sharpness control parameterk₁<0, then the adjustment is a blurring process performed on the image.4. The method of claim 2, wherein if the brightness control parameterk₂>0 then the adjustment is a brightening process performed on theimage; otherwise, if the brightness control parameter k₂<0 then theadjustment is a darkening process performed on the image.
 5. The methodof claim 2, wherein if the sharpness adjustment enable parameter k₃=0,then sharpness adjustment is disabled; otherwise, if the sharpnessadjustment enable parameter k₃=1, then the sharpness adjustment isenabled.